package com.tcat.item.pojo;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
@ApiModel(description = "Sku")
@Data
@Table(name = "tb_sku")
public class Sku {
    @Id
    @KeySql(useGeneratedKeys=true)
    private Long id;
    @Column(name="spu_id")
    private Long spuId;
    private String title;
    private String images;
    private Long price;
    // 商品特殊规格的键值对

    @Column(name="own_spec")
    private String ownSpec;
    // 商品特殊规格的下标

    private String indexes;
    // 是否有效，逻辑删除用

    private Boolean enable;
    // 创建时间

    @Column(name="create_time")
    private Date createTime;
    // 最后修改时间

    @Column(name="last_update_time")
    private Date lastUpdateTime;
    // 库存

    @Transient
    private Integer stock;
}